<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/white/common/common.jsp"%>
<%@include file="/white/common/taglibs.jsp"%>
<html>
	<head>
		<script type="text/javascript">
        function submitForm(){
            var searchForm=document.getElementById("searchForm");
            searchForm.submit();
        }
        
        function notAllowedLockSelf(id){           
            var searchForm=document.getElementById("searchForm");
            searchForm.action="userAction-"+id+"!lock.action";
            searchForm.submit();            
        }
        
        function validateModify(){        	
        	var check = document.getElementsByName("selectedIds");
        	var a = 0;
            var id;
           
            for(var i=0;i <check.length;i++){
                if(check[i].checked==true){
                    a++;
                    id = check[i].value;
                }
            }
            
            if(a == 1){            	
            	var searchForm=document.getElementById("searchForm");
            	searchForm.action="nspLoggerAction-"+id+"!toEdit.action";
            	searchForm.submit();
                return true;
            }else{
                alert("请选择一条记录");
                return false;
            }
        }        
        
        function validateDelete(){
            var check=document.getElementsByName("selectedIds");
            var a=false;
            for(var i=0;i <check.length;i++){
                if(check[i].checked==true){
                    a=true;
                    break;
                }
            }
            if(a){
                return confirm('你确定所选内容?');
            }else{
                alert("请先择你要删除的内容!!");
                return false;
            }
        }

        function doDelete(){
            var searchForm=document.getElementById("searchForm");
            searchForm.action='nspLoggerAction!delete.action';
            searchForm.submit();
            return true;
        }
        
        function displayResult(){
            var result = "<s:property value='result'/>";
            if(result != null && result != ""){
                alert(result);
            }
        }    
        
    </script>
	</head>
	<body onload="displayResult()">
		<s:form method="post" action="nspLoggerAction!queryByPage.action"
			theme="simple" id="searchForm">
			<div id="div_title">
				<h3>
					NSP接口日志表(LOGGER)
				</h3>
				<div id="div_search">
					<table>
						<tr>
							<!-- 查询条件 -->
							<td width="80" align="right">
								Id:
							</td>
							<td>
								<s:textfield name="query_id" />
							</td>
							<td width="80" align="right"><!-- LogId: -->
								日志ID:
							</td>
							<td>
								<s:textfield name="query_logId" />
							</td>
							<td width="80" align="right"><!-- RequestIp: -->
								请求IP地址:
							</td>
							<td>
								<s:textfield name="query_requestIp" />
							</td>
							
							<td width="80" align="right"><!-- RequestTime: -->
								日志时间:
							</td>
							
							<td>
								<s:textfield name="query_requestTime" />
							</td>
							
						</tr>
						<tr>	
							
							<td width="80" align="right"><!-- RequestInfo: -->
								请求信息:
							</td>
							<td>
								<s:textfield name="query_requestInfo" />
							</td>
							<td width="80" align="right"><!-- RequestType: -->
								请求类型:
							</td>
							<td>
								<s:textfield name="query_requestType" />
							</td>
						
							
							<td width="80" align="right"><!-- ResponseData: -->
								响应日期:
							</td>
							<td>
								<s:textfield name="query_responseData" />
							</td>
							<td width="80" align="right"><!-- ResponseInfo: -->
								响应信息:
							</td>
							<td>
								<s:textfield name="query_responseInfo" />
							</td>
							
						</tr>
						<tr>
							<td width="80" align="right"><!-- ResponseCode: -->
								响应代码:
							</td>
							<td>
								<s:textfield name="query_responseCode" />
							</td>
							<td width="80" align="right">
								<authz:authorize ifAnyGranted="OMC_NSP_LOGGER">
									<s:submit cssClass="submit_search" value="搜索"
										action="nspLoggerAction!queryByPage" />
								</authz:authorize>
							</td>
						</tr>
					</table>
				</div>
			</div>
			
			<!-- 
			<div id="div_button">
				<authz:authorize ifAnyGranted="OMC_NSP_LOGGER">
					<s:submit value="新增"
						onclick="form.action='nspLoggerAction!toAdd.action';return true;"
						cssClass="input_button" />
				</authz:authorize>
				<authz:authorize ifAnyGranted="OMC_NSP_LOGGER">
					<s:submit value="修改" onclick="return validateModify()"
						cssClass="input_button" />
				</authz:authorize>
				<authz:authorize ifAnyGranted="OMC_NSP_LOGGER">
					<input type="button" value="删除"
						onclick="if(validateDelete()){doDelete()}" class="input_button">
				</authz:authorize>
				<%@include file="/white/common/message.jsp"%>
			</div>
			
			 -->
			
			<!--列表 �?�� -->
			<table cellpadding="0" cellspacing="0" class="t_list">
				<tr>
				
					<!--列表头部 -->
					<th>
						Id
					</th>
					
					<th><!-- LogId -->
						日志ID
					</th>
					<th><!-- RequestTime -->
						日志时间
					</th>
					<th><!-- RequestInfo -->
						请求信息
					</th>
					<th><!-- RequestType -->
						请求类型
					</th>
					<th><!-- RequestIp -->
						请求IP地址
					</th>
					<th><!-- ResponseData -->
						响应日期
					</th>
					<th><!-- ResponseInfo -->
						响应信息
					</th>
					
					<th><!-- ResponseCode -->
						响应代码
					</th>
				</tr>
				<s:iterator value="resultList" status="sindex">
					<tr>
						<td>
							<s:property value="ID" />
						</td>
						<td>
							<s:property value="LOG_ID" />
						</td>
						<td>
							<s:property value="REQUEST_TIME" />
						</td>
						<td>
							<s:property value="REQUEST_INFO" />
						</td>
						<td>
							<s:property value="REQUEST_TYPE" />
						</td>
						<td>
							<s:property value="REQUEST_IP" />
						</td>
						<td>
							<s:property value="RESPONSE_DATA" />
						</td>
						<td>
							<s:property value="RESPONSE_INFO" />
						</td>
						
						<td>
							<s:property value="RESPONSE_CODE" />
						</td>
					</tr>
				</s:iterator>
			</table>
			<!--列表 结束 -->
			<!--分页 �?�� -->
			<s:if test="resultList.size() > 0">
				<table border="0" cellspacing="0" cellpadding="0" class="t_bottom">
					<tr>
						<td><%@include file="/white/common/pageList.jsp"%></td>
					</tr>
				</table>
			</s:if>
			<!--分页 结束 -->

		</s:form>
	</body>
</html>
